﻿using AutoMapper;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using WMS.FC.Application.RF.Interface;
using WMS.FC.Application.System;
using WMS.FC.Domain.DataTransferObject.WCS;
using WMS.FC.Domain.DomainObject.System;
using WMS.FC.Domain.Repository;

namespace WMS.FC.Application.RF
{
    public class RfService : ServiceBase, IRfService
    {
        protected readonly IRfService rfService;
        public RfService(
            ILogger<ServiceBase> logger,
            IOptions<WmsSettings> options,
            IMapper mapper,
            IRfService rfService,
            IUnitOfWork unitOfWork)
            : base(logger, options, mapper, unitOfWork)
        {
            this.rfService = rfService;
        }

        public async Task<ResponseBase> SendPDATask(DownPDATaskDTO dTO)
        {
            var response = new ResponseBase();
            try
            {
                //var result = await unitOfWork.UseTranAsync(async () =>
                //{
                //    return await getInboundTaskService.GetInboundTask(dTO.TrayBarcode, dTO.StationCode, dTO.UserInfo);
                //});

                //response = response.TransferResult(result, mapper.Map<DownPDATaskDTO>);
            }
            catch (Exception ex)
            {
                response = response.Exception(ex);
            }

            return response;
        }
    }
}
